<%@ Page Language="VB" AutoEventWireup="false" CodeFile="Bulletin_CMS.aspx.vb" Inherits="Secure_Bulletin_CMS" %>

<%@ Register Src="../Header.ascx" TagName="Header" TagPrefix="uc1" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml" >
<head runat="server">
    <title>Seminole County Youth Commission</title>
    <link rel="stylesheet" type="text/css" href="../css/main.css" />
    <link rel="stylesheet" type="text/css" href="../css/hmenu.css" />
    <link rel="stylesheet" type="text/css" href="../css/contact.css" />
</head>
<body>
    <form id="form1" runat="server">
        <table width="770" border="1" align="center" cellpadding="0" cellspacing="0" style="background-color: #666666;
            height: 100%;">
            <tr>
                <td>
                    <table width="100%" border="0" cellpadding="0" cellspacing="0">
                        <tr>
                            <td>
                                <img src="../images/header.jpg" width="770" height="135" alt="" /></td>
                        </tr>
                        <tr>
                            <td style="background-color: #B32C24">
                                <div class="horizontalcssmenu">
                                    <ul id="cssmenu1">
                                    <asp:Label ID="pageNavigationLabel" runat="server"></asp:Label>
                                    </ul>                     
                                </div>
                            </td>
                        </tr>
                    </table>
                    <table width="100%" border="0" cellpadding="0" cellspacing="0" style="background-color: #FFFFFF;
                        height: 739;">
                        <tr>
                            <td valign="top" style="width: 65px; height: 26px;">
                            </td>
                            <td valign="top" style="width: 346px; height: 26px;">
                                <asp:Label ID="Label1" runat="server" ForeColor="White" Text="Insert Complete"></asp:Label></td>
                            <td valign="top" style="width: 65px; height: 26px;">
                                <uc1:Header ID="Header1" runat="server" />
                            </td>
                        </tr>
                        <tr>
                            <td valign="top" style="width: 65px; height: 109px;"></td>
                            <td valign="top" style="width: 346px; height: 109px;">
                                Bulletin Type<br />
                                <asp:TextBox ID="bulletinType" runat="server"></asp:TextBox><br />
                                Bulletin Date<br />
                                <asp:TextBox ID="BulletinDate" runat="server"></asp:TextBox><br />
                                Bulletin Text<br />
                                <asp:TextBox ID="BulletinText" runat="server"></asp:TextBox><br />
                                More URL<br />
                                <asp:TextBox ID="MoreUrl" runat="server"></asp:TextBox><br />
                                Bulletin Title<br />
                                <asp:TextBox ID="BulletinTitle" runat="server"></asp:TextBox>
                                <br />
                                Is Active<br />
                                <asp:CheckBox ID="isActive" runat="server" />
                                <asp:Button ID="Button1" runat="server" Text="Insert!" /><br />
                                <br />
                            </td>
                            <td valign="top" style="width: 65px; height: 109px;"></td>
                        </tr>
                        <tr>
                            <td height="361" style="width: 65px">
                            </td>
                            <td valign="top" style="width: 346px; text-align: center;">

                                <fieldset style="width: 99%; height: 32px; left: 0px; top: 0px;">
                                    <legend>Bulletins</legend>
                                    <asp:GridView ID="GridView1" runat="server" AllowPaging="True" AllowSorting="True"
                                        AutoGenerateColumns="False" DataKeyNames="ID" DataSourceID="SqlDataSource1" EmptyDataText="There are no data records to display.">
                                        <Columns>
                                            <asp:CommandField ShowDeleteButton="True" ShowEditButton="True" />
                                            <asp:BoundField DataField="ID" HeaderText="ID" ReadOnly="True" SortExpression="ID" />
                                            <asp:BoundField DataField="bulletin_type" HeaderText="bulletin_type" SortExpression="bulletin_type" />
                                            <asp:BoundField DataField="bulletin_date" HeaderText="bulletin_date" SortExpression="bulletin_date" />
                                            <asp:BoundField DataField="bulletin_text" HeaderText="bulletin_text" SortExpression="bulletin_text" DataFormatString="&lt;span class=&quot;morelink&quot;&gt;&lt;a href=&quot;#&quot;&gt;Bulletin text&lt;span&gt;{0}&lt;/span&gt;&lt;/a&gt;&lt;/span&gt;" />
                                            <asp:BoundField DataField="more_url" HeaderText="more_url" SortExpression="more_url" />
                                            <asp:BoundField DataField="bulletin_title" HeaderText="bulletin_title" SortExpression="bulletin_title" />
                                            <asp:CheckBoxField DataField="Active" HeaderText="Active" SortExpression="Active" />
                                        </Columns>
                                    </asp:GridView>
                                    <asp:SqlDataSource ID="SqlDataSource1" runat="server" ConnectionString="<%$ ConnectionStrings:CET_4584ConnectionString1 %>"
                                        DeleteCommand="DELETE FROM [bulletins] WHERE [ID] = @ID" InsertCommand="INSERT INTO [bulletins] ([bulletin_type], [bulletin_date], [bulletin_text], [more_url], [bulletin_title], [Active]) VALUES (@bulletin_type, @bulletin_date, @bulletin_text, @more_url, @bulletin_title, @Active)"
                                        ProviderName="<%$ ConnectionStrings:CET_4584ConnectionString1.ProviderName %>"
                                        SelectCommand="SELECT [ID], [bulletin_type], [bulletin_date], [bulletin_text], [more_url], [bulletin_title], [Active] FROM [bulletins]"
                                        UpdateCommand="UPDATE [bulletins] SET [bulletin_type] = @bulletin_type, [bulletin_date] = @bulletin_date, [bulletin_text] = @bulletin_text, [more_url] = @more_url, [bulletin_title] = @bulletin_title, [Active] = @Active WHERE [ID] = @ID">
                                        <InsertParameters>
                                            <asp:Parameter Name="bulletin_type" Type="String" />
                                            <asp:Parameter Name="bulletin_date" Type="DateTime" />
                                            <asp:Parameter Name="bulletin_text" Type="String" />
                                            <asp:Parameter Name="more_url" Type="String" />
                                            <asp:Parameter Name="bulletin_title" Type="String" />
                                            <asp:Parameter Name="Active" Type="Boolean" />
                                        </InsertParameters>
                                        <UpdateParameters>
                                            <asp:Parameter Name="bulletin_type" Type="String" />
                                            <asp:Parameter Name="bulletin_date" Type="DateTime" />
                                            <asp:Parameter Name="bulletin_text" Type="String" />
                                            <asp:Parameter Name="more_url" Type="String" />
                                            <asp:Parameter Name="bulletin_title" Type="String" />
                                            <asp:Parameter Name="Active" Type="Boolean" />
                                            <asp:Parameter Name="ID" Type="Int32" />
                                        </UpdateParameters>
                                        <DeleteParameters>
                                            <asp:Parameter Name="ID" Type="Int32" />
                                        </DeleteParameters>
                                    </asp:SqlDataSource>
                                    &nbsp;&nbsp;
                                </fieldset>
                            </td>
                            <td height="361" style="width: 65px">
                                </td>
                        </tr>
                        <tr>
                            <td height="109" valign="top" style="width: 65px">
                            </td>
                            <td height="109" valign="top" style="width: 346px">
                            </td>
                        </tr>
                    </table>
                    <table width="100%" border="0" cellspacing="0" cellpadding="0" style="background-color: #FFFFFF">
                        <tr align="center">
                            <td>
                                &copy; 2007 Seminole County Youth Commission</td>
                        </tr>
                    </table>
                </td>
            </tr>
        </table>
    </form>
</body>
</html>
